package io.renren.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.commons.mybatis.service.impl.CrudServiceImpl;
import io.renren.dao.AssemblyNoticeDao;
import io.renren.dto.AssemblyNoticeDTO;
import io.renren.entity.AssemblyNoticeEntity;
import io.renren.service.AssemblyNoticeService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 信息通知
 *
 * @author liuyujun 384880231@qq.com
 * @since 3.0 2022-01-13
 */
@Service
public class AssemblyNoticeServiceImpl extends CrudServiceImpl<AssemblyNoticeDao, AssemblyNoticeEntity, AssemblyNoticeDTO> implements AssemblyNoticeService {

    @Override
    public QueryWrapper<AssemblyNoticeEntity> getWrapper(Map<String, Object> params){
        QueryWrapper<AssemblyNoticeEntity> wrapper = new QueryWrapper<>();

        String title = (String)params.get("title");
        wrapper.like(StringUtils.isNotBlank(title), "title", title);

        return wrapper;
    }


}